import request from '@/utils/request'

// 查询工时记录列表
export function listRecord(query) {
  return request({
    url: '/mes/workinghours/record/list',
    method: 'get',
    params: query
  })
}
// 查询工时记录详细
export function getRecord(id) {
  return request({
    url: '/mes/workinghours/record/' + id,
    method: 'get'
  })
}

// 新增工时记录
export function addRecord(data) {
  return request({
    url: '/mes/workinghours/record/add ',
    method: 'post',
    data: data
  })
}

//查询工单信息
export function getWorkInfo(query) {
  return request({
    url: '/mes/pro/workorder/getWorkInfo',
    method: 'get',
    params: query
  })
}

// 修改工时记录
export function updateRecord(data) {
  return request({
    url: '/mes/workinghours/record/edit',
    method: 'post',
    data: data
  })
}
// 删除工时记录
export function delRecord(id) {
  return request({
    url: '/mes/workinghours/record//' + id,
    method: 'delete'
  })
}

//查询所有产线信息
export function getAllLineList(query) {
  return request({
    url: '/mes/md/line/getAllList',
    method: 'get',
    params: query
  })
}

//查询所有工序信息
export function getAllProcessList(query) {
  return request({
    url: '/mes/pro/process/listAll',
    method: 'get',
    params: query
  })
}